from django.conf.urls.defaults import *
from lab.seminars.models import Presentation


date_based_dict = {
	'queryset' : Presentation.objects.all(),
	'date_field' : 'date',
}

list_detail_dict = {
	'queryset' : Presentation.objects.all(),
}



urlpatterns = patterns('',
	(r'^create/$','lab.seminars.views.presentation_form'),
	(r'^update/(?P<slug>[-\w]+)/$','lab.seminars.views.presentation_form'),
)  

urlpatterns += patterns('django.views.generic',
   (r'^/latest/$','date_based.archive_index', date_based_dict),
   #(r'^(?P<year>\d{4})/(?P<month>[a-z]{3})/(?P<day>\w{1,2})/(?P<object_id>\d+)/$', 'date_based.object_detail', date_based_dict),
   (r'^(?P<year>\d{4})/(?P<month>[a-z]{3})/(?P<day>\w{1,2})/$', 'date_based.archive_day',   date_based_dict),
   (r'^(?P<year>\d{4})/(?P<month>[a-z]{3})/$','date_based.archive_month', date_based_dict),
   (r'^(?P<year>\d{4})/$','date_based.archive_year',  date_based_dict),
   (r'^delete/(?P<object_id>\d+)/$','create_update.delete_object', dict(model = Presentation, post_delete_redirect = '/seminars/')),
   (r'^manage/$','simple.direct_to_template',{'template':'seminars/manage.html'}),
   (r'^$','list_detail.object_list', list_detail_dict),
)


